using System;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Content;
using CF.Framework.Engine.Drawing;
using CF.Framework.Engine.Screens;

namespace CF.Framework.Engine.Screens
{
	/// <summary>
	/// The background screen sits behind all the other menu screens.
	/// It draws a background image that remains fixed in place regardless
	/// of whatever transitions the screens on top of it may be doing.
	/// </summary>
	internal class StudioLogoScreen : FadeInOutScreen
	{
		internal StudioLogoScreen()
		{
		}

		protected override void OnLoadContent()
		{
			BackgroundImage = Load<Texture2D>("images/logo");

			base.OnLoadContent();
		}

		protected override void OnHandleInput(InputState input)
		{
			base.OnHandleInput(input);

			if (input.CurrentGamePadStates[0].IsButtonDown(Buttons.Back))
			{
				ExitScreen();
				return;
			}
		}
	}
}